<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="icon" href="./images/favicon.ico" type="image/x-icon" />
    <link rel="shortcut icon" href="./images/favicon.ico" type="image/x-icon" />
    <title>在线技术社区-欢迎登录</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" rel="stylesheet">
    <style>
        .navbar-default{
        margin:0;
        background-color:#f8f8f8;
        border: 0;
    }
    .navbar-brand{
        width:126px;
    }
    .navbar-brand img{
        display:inline;
    }
    .navbar-nav li a{
        display:inline-block;
    } 

    /*
    .sub{
        max-width:1200px;
        margin:auto;
    }
    */
    .navbarleft{
        width:160px;
        height:1666px;;
        background-color:#f8f8f8;
    }
    .navbarleft .nav-stacked li{
        margin:20px 10px;
    }
    .navbarleft .nav-stacked .btn-group .btn-danger{
        background-color:#f8f8f8;
        border-color:#f8f8f8;
        color:black;
    }
    .return{
        position:fixed;
        right:10px;
        bottom:40px;
        width:42px;
        height:42px;
        background:url('./images/返回.png');
        border:1px solid black;
        border-radius:6px;
    }

    @media (min-width: 768px){

        .navbar-collapse #navbar-nav2{
            float:right;
        }
        .navbar-collapse .navbar-left{
            float:right!important;
        }
    }
    @media(max-width:768px){
        .navbar-nav .li1{
        margin-left:27px;
        }
        .navbar-collapse .navbar-left .form-group{
            display:inline-block;
        }
       
    }
    </style>
    <link href="./css/myPagination.css" rel="stylesheet">
</head>

<body>
    <nav class="navbar navbar-default">
        <div class="container-fluid">
            <!-- Brand and toggle get grouped for better mobile display -->
            <div class="navbar-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"
                    aria-expanded="false">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <span class="navbar-brand"><img src="./images/logo1.png"><a href="#">技术社区</a></span>
            </div>

            <!-- Collect the nav links, forms, and other content for toggling -->
            <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                <ul class="nav navbar-nav">
                    <li class="li1"><a href="#">首页</a></li>
                    <li class="li2">
                        <img src="./images/下载.png">
                        <a href="#">下载</a>
                    </li>
                    <li class="li3">
                        <img src="./images/上传.png">
                        <a href="#">上传</a>
                    </li>
                    <li class="li4">
                        <img src="./images/消息.png">
                        <a href="#">消息</a>
                    </li>
                </ul>
                <ul class="nav navbar-nav" id="navbar-nav2">
                    <li class="li5"><a href="#">登录</a></li>
                    <li class="li6"><a href="#">注册</a></li>
                </ul>
                <form class="navbar-form navbar-left">
                    <div class="form-group">
                        <input type="text" class="form-control" placeholder="搜索">
                    </div>
                    <button type="submit" class="btn btn-default">确认</button>
                </form>
            </div>
        </div>
    </nav>

    <div class="sub">
        <div class="navbarleft">
            <ul class="nav nav-pills nav-stacked">
                <li role="presentation">
                    <div class="btn-group">
                        <button type="button" class="btn btn-danger">计算机基础</button>
                        <button type="button" class="btn btn-danger dropdown-toggle" data-toggle="dropdown"
                            aria-haspopup="true" aria-expanded="false">
                            <span class="caret"></span>
                            <span class="sr-only">Toggle Dropdown</span>
                        </button>
                        <ul class="dropdown-menu">
                            <li><a href="#">计算机基础1</a></li>
                            <li><a href="#">计算机基础2</a></li>
                            <li><a href="#">计算机基础3</a></li>
                            <li role="separator" class="divider"></li>
                            <li><a href="#">计算机基础4</a></li>
                        </ul>
                    </div>
                </li>
                <li role="presentation">
                    <div class="btn-group">
                        <button type="button" class="btn btn-danger">编程语言</button>
                        <button type="button" class="btn btn-danger dropdown-toggle" data-toggle="dropdown"
                            aria-haspopup="true" aria-expanded="false">
                            <span class="caret"></span>
                            <span class="sr-only">Toggle Dropdown</span>
                        </button>
                        <ul class="dropdown-menu">
                            <li><a href="#">c</a></li>
                            <li><a href="#">c++</a></li>
                            <li><a href="#">python</a></li>
                            <li><a href="#">Java</a></li>
                            <li><a href="#">PHP</a></li>
                            <li role="separator" class="divider"></li>
                            <li><a href="#">JavaScript</a></li>
                        </ul>
                    </div>
                </li>
                <li role="presentation">
                    <div class="btn-group">
                        <button type="button" class="btn btn-danger">网页设计</button>
                        <button type="button" class="btn btn-danger dropdown-toggle" data-toggle="dropdown"
                            aria-haspopup="true" aria-expanded="false">
                            <span class="caret"></span>
                            <span class="sr-only">Toggle Dropdown</span>
                        </button>
                        <ul class="dropdown-menu">
                            <li><a href="#">UI</a></li>
                            <li><a href="#">HTML</a></li>
                            <li><a href="#">css</a></li>
                            <li role="separator" class="divider"></li>
                            <li><a href="#">网页设计</a></li>
                        </ul>
                    </div>
                </li>
                <li role="presentation">
                    <div class="btn-group">
                        <button type="button" class="btn btn-danger">移动并发</button>
                        <button type="button" class="btn btn-danger dropdown-toggle" data-toggle="dropdown"
                            aria-haspopup="true" aria-expanded="false">
                            <span class="caret"></span>
                            <span class="sr-only">Toggle Dropdown</span>
                        </button>
                        <ul class="dropdown-menu">
                            <li><a href="#">移动并发1</a></li>
                            <li><a href="#">移动并发2</a></li>
                            <li><a href="#">移动并发3</a></li>
                            <li role="separator" class="divider"></li>
                            <li><a href="#">移动并发4</a></li>
                        </ul>
                    </div>
                </li>
                <li role="presentation">
                    <div class="btn-group">
                        <button type="button" class="btn btn-danger">IT基础框架</button>
                        <button type="button" class="btn btn-danger dropdown-toggle" data-toggle="dropdown"
                            aria-haspopup="true" aria-expanded="false">
                            <span class="caret"></span>
                            <span class="sr-only">Toggle Dropdown</span>
                        </button>
                        <ul class="dropdown-menu">
                            <li><a href="#">IT基础框架1</a></li>
                            <li><a href="#">IT基础框架2</a></li>
                            <li><a href="#">IT基础框架3</a></li>
                            <li role="separator" class="divider"></li>
                            <li><a href="#">IT基础框架4</a></li>
                        </ul>
                    </div>
                </li>
                <li role="presentation">
                    <div class="btn-group">
                        <button type="button" class="btn btn-danger">人工智能</button>
                        <button type="button" class="btn btn-danger dropdown-toggle" data-toggle="dropdown"
                            aria-haspopup="true" aria-expanded="false">
                            <span class="caret"></span>
                            <span class="sr-only">Toggle Dropdown</span>
                        </button>
                        <ul class="dropdown-menu">
                            <li><a href="#">云计算</a></li>
                            <li><a href="#">大数据</a></li>
                            <li><a href="#">数据可视化</a></li>
                            <li role="separator" class="divider"></li>
                            <li><a href="#">人工智能</a></li>
                        </ul>
                    </div>
                </li>
                <li role="presentation">
                    <div class="btn-group">
                        <button type="button" class="btn btn-danger">区块链</button>
                        <button type="button" class="btn btn-danger dropdown-toggle" data-toggle="dropdown"
                            aria-haspopup="true" aria-expanded="false">
                            <span class="caret"></span>
                            <span class="sr-only">Toggle Dropdown</span>
                        </button>
                        <ul class="dropdown-menu">
                            <li><a href="#">比特币</a></li>
                            <li><a href="#">以太坊</a></li>
                            <li><a href="#">空气币</a></li>
                            <li role="separator" class="divider"></li>
                            <li><a href="#">区块链</a></li>
                        </ul>
                    </div>
                </li>
                <li role="presentation">
                    <div class="btn-group">
                        <button type="button" class="btn btn-danger">大数据云计算</button>
                        <button type="button" class="btn btn-danger dropdown-toggle" data-toggle="dropdown"
                            aria-haspopup="true" aria-expanded="false">
                            <span class="caret"></span>
                            <span class="sr-only">Toggle Dropdown</span>
                        </button>
                        <ul class="dropdown-menu">
                            <li><a href="#">大数据</a></li>
                            <li><a href="#">云计算</a></li>
                            <li><a href="#">大数据云计算1</a></li>
                            <li role="separator" class="divider"></li>
                            <li><a href="#">大数据云计算2</a></li>
                        </ul>
                    </div>
                </li>
                <li role="presentation">
                    <div class="btn-group">
                        <button type="button" class="btn btn-danger">其他</button>
                        <button type="button" class="btn btn-danger dropdown-toggle" data-toggle="dropdown"
                            aria-haspopup="true" aria-expanded="false">
                            <span class="caret"></span>
                            <span class="sr-only">Toggle Dropdown</span>
                        </button>
                        <ul class="dropdown-menu">
                            <li><a href="#">其他1</a></li>
                            <li><a href="#">其他2</a></li>
                            <li><a href="#">其他3</a></li>
                            <li role="separator" class="divider"></li>
                            <li><a href="#">其他4</a></li>
                        </ul>
                    </div>
                </li>
            </ul>
        </div>
    </div>

    <div id="pagination" class="pagination"></div>

    <!--这是使页面立即返回顶部的盒子-->
    <div class="return"></div>

    <script>
        window.onload = function () {
            //返回顶部
            var back = document.getElementsByClassName('return')[0];
            back.onclick = function () {
                scrollTo(0,0);
            }

            //分页
            new Page({
                id: 'pagination',
                pageTotal: 50, //必填,总页数
                pageAmount: 10,  //每页多少条
                dataTotal: 500, //总共多少条数据
                curPage: 1, //初始页码,不填默认为1
                pageSize: 5, //分页个数,不填默认为5
                showPageTotalFlag: true, //是否显示数据统计,不填默认不显示
                showSkipInputFlag: true, //是否支持跳转,不填默认不显示
                getPage: function (page) {
                    //获取当前页数
                    console.log(page);
                }
            })
        }
    </script>
    <script src="./js/mypagination.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/jquery@1.12.4/dist/jquery.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script>
</body>

</html>